<!DOCTYPE html>
<title>Test that reparenting a removed media tag doesn't crash the process.</title>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<script>
async_test(function(t) {
    var iframe = document.createElement('iframe');
    document.documentElement.appendChild(iframe);
    var div = iframe.contentDocument.createElement('div');
    div.innerHTML = '<audio src="1">';
    var node = div;
    iframe.parentNode.removeChild(iframe);
    document.documentElement.appendChild(node);
    setTimeout(t.step_func_done(), 100);
})
</script>